﻿// Sheego.Service.X400
// Copyright(C) 2015 Schwab Versand GmbH
//
// This source file is subject to the Microsoft Public License(Ms-PL).
// http://www.opensource.org/licenses/ms-pl.html
// All other rights reserved.
using Sheego.Service.X400.Job.Shared;
using Sheego.Service.X400.Job.Shared.BO;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sheego.Service.X400.Job.Impl
{
    class JobLogger : IJobLogger
    {
        private IFileManager FileManager;
        #region IJobLogger Members

        public JobLogger(IFileManager fileManager)
        {
            FileManager = fileManager;
        }

        public void Info(string format, params object[] args)
        {
            var Message = String.Format(format, args);
            FileManager.AppendLogFile("INFO", DateTime.Now, Message);
        }

        public void Error(string format, params object[] args)
        {
            var Message = String.Format(format, args);
            FileManager.AppendLogFile("ERROR", DateTime.Now, Message);
        }

        #endregion
    }
}
